---
import { Image } from "astro:assets";
import bg from "@/assets/bg/normal.png";
export interface Props {
  /** 背景路径 */
  background?: string;
  customCSS?: string;
  customElementFunction?: () => HTMLDivElement;
}

const { background, customElementFunction, customCSS } = Astro.props;
---

{
  customElementFunction?.() ?? (
    <div
      class="fixed top-0 left-0 -z-[2000] w-screen h-screen"
      id="background"
      style={customCSS}
      transition:persist
    >
      <Image src={bg} alt="" class="w-full h-full object-cover" />
    </div>
  )
}
